﻿@if (User.Identity.IsAuthenticated)
{

    <div id="SiteUser">
        <span>Witaj @User.Identity.Name</span>
        @Html.ActionLink("Wyloguj się", "Logout", "Account", null, new { id = "LogInL" })
    </div>}
else
{ <div id="SiteUser">
        <span>Nie jesteś zalogowany</span>
        <a id="LogIn">Zaloguj się</a>
        @Html.ActionLink("Zaloguj sie", "LogIn", "Account", null, new { id = "LogIn2" })
    </div>

    <div id="LogInBox">
        @using (Html.BeginForm("Login", "Account", FormMethod.Post))
        {
 @Html.AntiForgeryToken()

            <table>
                <tr>
                    <td>Login</td>
                    <td>
                        <input type="text" name="User_login" class="InputText" /></td>
                </tr>
                <tr>
                    <td>Hasło</td>
                    <td>
                        <input type="password" name="User_pass" class="InputText" /></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <div style="margin-left: 15px; float: left;">
                            @Html.CheckBox("rememberMe", false)
                            <span style="font-size: 14px;">zapamiętaj mnie</span>
                        </div>
                        <input type="submit" id="Submit" value="Zaloguj się" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        @Html.ActionLink("Rejestracja", "Create", "Account", null, new { id = "Register" })
                    </td>
                </tr>
                <tr>
                    <td colspan="2" id="LogInErrors">
                        @Html.ValidationSummary(true)
                    </td>
                </tr>
            </table>
        }
    </div>
}